<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        *{
            padding: 0px;
            margin: 0px;
        }
        .lbox{
            width: 0px;
            height: 0px;
            border-top: 50px solid red;
            border-right: 50px solid orange;
            border-bottom: 50px solid pink;
            border-left: 50px solid gray;
        }
        .rbox{
            /*宽高没有边框大的时候*/
            width: 30px;
            height: 30px;
            border-top: 50px solid red;
            border-right: 50px solid orange;
            border-bottom: 50px solid pink;
            border-left: 50px solid gray;
        }
        .box1{
            width: 0px;
            height: 0px;
            border-left: 50px solid transparent;
            border-right: 50px solid transparent;
            border-bottom: 100px solid red;
        }
        .box2{
            width: 0px;
            height: 0px;
            border-left: 50px solid transparent;
            border-right: 50px solid transparent;
            border-top: 100px solid red;
        }
        .box3{
            width: 0px;
            height: 0px;
            border-top: 50px solid transparent;
            border-bottom: 50px solid transparent;
            border-right: 100px solid red;
        }
        .box4{
            width: 0px;
            height: 0px;
            border-top: 50px solid transparent;
            border-bottom: 50px solid transparent;
            border-left: 100px solid red;
        }
    </style>
</head>
<body>
    <div class="lbox"></div>
    <br>
    <hr>
    <br>
    <div class="rbox"></div>
    <br>
    <hr>
    <br>

    <div class="box1"></div>
    <br>
    <hr>
    <br>
    <div class="box2"></div>
    <br>
    <hr>
    <br>
    <div class="box3"></div>
    <br>
    <hr>
    <br>
    <div class="box4"></div>
</body>
</html>